//Wed Mar  9 15:12:18 CST 2011
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class NinePuzzle
{
public:

    int getMinimumCost(string init, string goal)
    {
        for (int i = 0; i < goal.size(); i++)
        {
            int found = init.find(goal[i]);
            if (found != -1)
            {
                init.erase(init.begin() + found);
                goal.erase(goal.begin() + i);
                i--;
            }
        }
        return goal.size();
    }
};
